const _my = require("../../__antmove/api/index.js")(my);
const wx = _my;
let WebIM = require("../../utils/WebIM")["default"];
let disp = require("../../utils/broadcast");
Page({
    data: {
        username: "",
        isIde: my.isIDE,
    },
    onLoad: function() {
        let myUsername = wx.getStorageSync("myUsername");
        let me = this;
        this.setData({
            username: myUsername
        });
        this.setData({
            switchStatus: WebIM.config.isDebug
        });
    },
    onShow() {
        this.setData({
            switchStatus: WebIM.config.isDebug
        });
    },
    openDebug(event) {
        WebIM.isDebug({
            isDebug: event.detail.value
        });
        my.setStorage({
          key:'enableInnerView',
          data: true
        })
        my.showToast({
          content: "开启debug成功"
        })
    },
    clearDebug(event) {
      my.removeStorage({
        key: 'enableInnerView',
        success: () => {
          my.showToast({
            content: "缓存清除成功"
          })
        }
      })
    }
});
